var g_gmpLibJsLoaded=false; function gmpLoadGoogleLib(){ if(!g_gmpLibJsLoaded){ jQuery('head').append(''); g_gmpLibJsLoaded=true; }} function gmpGoogleMap(elementId, params, additionalData){ if(typeof(google)==='undefined'){ gmpLoadGoogleLib(); } params=params ? params:{}; additionalData=additionalData ? additionalData:{}; var defaults={ center: new google.maps.LatLng(40.69847032728747, -73.9514422416687) , zoom: 8 }; if(params.map_center&¶ms.map_center.coord_x&¶ms.map_center.coord_y){ params.center=new google.maps.LatLng(params.map_center.coord_x, params.map_center.coord_y); } if(params.zoom){ params.zoom=parseInt(params.zoom); } if(!GMP_DATA.isAdmin&¶ms.zoom_type=='zoom_level'&¶ms.zoom_mobile&&jQuery(document).width() < 768){ params.zoom=parseInt(params.zoom_mobile); } if(typeof(elementId)==='string'){ elementId=jQuery(elementId)[0]; } this._elementId=elementId; this._mapParams=jQuery.extend({}, defaults, params); this._mapObj=null; this._markers=[]; this._shapes=[]; this._heatmap=[]; this._clasterer=null; this._clastererEnabled=false; this._clastererMarkersGroupsStyles=[]; this._eventListeners={}; this._layers={}; this.mapMarkersGroups=additionalData.markerGroups ? additionalData.markerGroups:[]; this.init(); } gmpGoogleMap.prototype.init=function(){ this._beforeInit(); this._mapObj=new google.maps.Map(this._elementId, this._mapParams); this._afterInit(); }; gmpGoogleMap.prototype._beforeInit=function(){ if(typeof(this._mapParams.type_control)!=='undefined'){ if(typeof(google.maps.MapTypeControlStyle[ this._mapParams.type_control ])!=='undefined'){ this._mapParams.mapTypeControlOptions={ style: google.maps.MapTypeControlStyle[ this._mapParams.type_control ] }; this._mapParams.mapTypeControl=true; }else{ this._mapParams.mapTypeControl=false; }} if(typeof(this._mapParams.zoom_control)!=='undefined'){ if(typeof(google.maps.ZoomControlStyle[ this._mapParams.zoom_control ])!=='undefined'){ this._mapParams.zoomControlOptions={ style: google.maps.ZoomControlStyle[ this._mapParams.zoom_control ] }; this._mapParams.zoomControl=true; }else{ this._mapParams.zoomControl=false; }} if(typeof(this._mapParams.street_view_control)!=='undefined'){ this._mapParams.streetViewControl=parseInt(this._mapParams.street_view_control) ? true:false; } if(typeof(this._mapParams.pan_control)!=='undefined'){ this._mapParams.panControl=parseInt(this._mapParams.pan_control) ? true:false; } if(typeof(this._mapParams.overview_control)!=='undefined'){ if(this._mapParams.overview_control!=='none'){ this._mapParams.overviewMapControlOptions={ opened: this._mapParams.overview_control==='opened' ? true:false }; this._mapParams.overviewMapControl=true; }else{ this._mapParams.overviewMapControl=false; }} if(typeof(this._mapParams.dbl_click_zoom)!=='undefined'){ this._mapParams.disableDoubleClickZoom=parseInt(this._mapParams.dbl_click_zoom) ? false:true; } if(typeof(this._mapParams.mouse_wheel_zoom)!=='undefined'){ this._mapParams.scrollwheel=parseInt(this._mapParams.mouse_wheel_zoom) ? true:false; } if(typeof(this._mapParams.map_type)!=='undefined' && typeof(google.maps.MapTypeId[ this._mapParams.map_type ])!=='undefined' ){ this._mapParams.mapTypeId=google.maps.MapTypeId[ this._mapParams.map_type ]; } if(typeof(this._mapParams.map_stylization_data)!=='undefined' && this._mapParams.map_stylization_data ){ this._mapParams.styles=this._mapParams.map_stylization_data; } jQuery(document).trigger('gmapBeforeMapInit', this); }; gmpGoogleMap.prototype.getParams=function(){ return this._mapParams; }; gmpGoogleMap.prototype.getParam=function(key){ return this._mapParams[ key ]; }; gmpGoogleMap.prototype.setParam=function(key, value){ this._mapParams[ key ]=value; return this; }; gmpGoogleMap.prototype._afterInit=function(){ if(typeof(this._mapParams.marker_clasterer)!=='undefined'&&this._mapParams.marker_clasterer){ this.enableClasterization(this._mapParams.marker_clasterer); } this.applyZoomType(); if(typeof(this._mapParams.zoom_min)!=='undefined'&&typeof(this._mapParams.zoom_max)!=='undefined'){ this._setMinZoomLevel(); this._setMaxZoomLevel(); this._fixZoomLevel(); } this.resizeMapByHeight(); jQuery(window).bind('resize', jQuery.proxy(this.resizeMapByHeight, this)); jQuery(window).bind('orientationchange', jQuery.proxy(this.resizeMapByHeight, this)); jQuery(document).trigger('gmapAfterMapInit', this); }; gmpGoogleMap.prototype._setMinZoomLevel=function(){ var curZoom=this.getZoom(); var minZoom=parseInt(this._mapParams.zoom_min) ? parseInt(this._mapParams.zoom_min):null; this.getRawMapInstance().setOptions({minZoom: minZoom}); if(curZoom < minZoom) this.getRawMapInstance().setOptions({zoom: minZoom}); }; gmpGoogleMap.prototype._setMaxZoomLevel=function(){ var maxZoom=parseInt(this._mapParams.zoom_max) ? parseInt(this._mapParams.zoom_max):null; this.getRawMapInstance().setOptions({maxZoom: maxZoom}); if(this.getRawMapInstance().zoom > maxZoom) this.getRawMapInstance().setOptions({zoom: maxZoom}); }; gmpGoogleMap.prototype._fixZoomLevel=function(){ var eventHandle=this._getEventListenerHandle('zoom_changed', 'zoomChanged'); if(!eventHandle){ eventHandle=google.maps.event.addListener(this.getRawMapInstance(), 'zoom_changed', jQuery.proxy(function(){ var minZoom=parseInt(this.getParam('zoom_min')) , maxZoom=parseInt(this.getParam('zoom_max')); if(this.getZoom() < minZoom){ this.setZoom(minZoom); if(GMP_DATA.isAdmin&&this._getEventListenerHandle('idle', 'enableClasterization')) google.maps.event.trigger(this.getRawMapInstance(), 'idle'); } if(this.getZoom() > maxZoom){ this.setZoom(maxZoom); if(GMP_DATA.isAdmin&&this._getEventListenerHandle('idle', 'enableClasterization')) google.maps.event.trigger(this.getRawMapInstance(), 'idle'); }}, this)); this._addEventListenerHandle('zoom_changed', 'zoomChanged', eventHandle); }}; gmpGoogleMap.prototype.enableClasterization=function(clasterType, needTrigger){ needTrigger=needTrigger ? needTrigger:false; switch(clasterType){ case 'MarkerClusterer': var self=this; self.setClastererMarkersGroupsStyles(); var eventHandle=google.maps.event.addListenerOnce(self.getRawMapInstance(), 'idle', function(a, b, c){ var clasterGridSize=self.getParam('marker_clasterer_grid_size') , markerGroupsStyles=self.getClastererMarkersGroupsStyles(); var allMapMarkers=self.getAllRawMarkers() , allVisibleMapMarkers=[] , clasterer=self.getClasterer(); for(var i=0; i < allMapMarkers.length; i++){ if(allMapMarkers[i].getVisible()&&!parseInt(allMapMarkers[i].params.clasterer_exclude)){ allVisibleMapMarkers.push(allMapMarkers[i]); }} if(clasterer){ clasterer.clearMarkers(); clasterer.addMarkers(allVisibleMapMarkers); clasterer.setStyles(markerGroupsStyles); self.setClastererGridSize(clasterGridSize); clasterer.resetViewport(); clasterer.redraw(); }else{ clasterer=new MarkerClusterer(self.getRawMapInstance(), allVisibleMapMarkers, { styles: markerGroupsStyles }); clasterer.setCalculator(self.customClastererCalculatorFunction(markerGroupsStyles)); self.setClasterer(clasterer); self.setClastererGridSize(clasterGridSize); clasterer=self.getClasterer(); }}); this._addEventListenerHandle('idle', 'enableClasterization', eventHandle); if(GMP_DATA.isAdmin||needTrigger){ google.maps.event.trigger(self.getRawMapInstance(), 'idle'); } this._clastererEnabled=true; break; }}; gmpGoogleMap.prototype.disableClasterization=function(){ var eventHandle=this._getEventListenerHandle('idle', 'enableClasterization'); if(eventHandle){ var clasterer=this.getClasterer(); if(clasterer){ clasterer.clearMarkers(); var markers=this.getAllRawMarkers(); for(var i=0; i < markers.length; i++){ markers[i].setMap(this.getRawMapInstance()); }} google.maps.event.removeListener(eventHandle); google.maps.event.trigger(this.getRawMapInstance(), 'idle'); this._clastererEnabled=false; }}; gmpGoogleMap.prototype.customClastererCalculatorFunction=function(markerGroupsStyles){ return function(markers, numStyles){ var styleIndex=1, markersGroupsStyles=markerGroupsStyles, markersGroupsIds={}, maxCount=0, groupId=0, curStyle=[]; for (var i=0; i < markers.length; i++){ if(markers[i].marker_group_id){ if(typeof(markersGroupsIds[markers[i].marker_group_id])=='undefined'){ markersGroupsIds[markers[i].marker_group_id]=1; }else{ markersGroupsIds[markers[i].marker_group_id]++; }} } for (var currGroupId in markersGroupsIds){ if(markersGroupsIds[currGroupId] > maxCount){ maxCount=markersGroupsIds[currGroupId]; groupId=currGroupId; }} curStyle=jQuery.grep(markersGroupsStyles, function (e, i){ if(e.marker_group_id==groupId){ return e; }}); if(curStyle&&curStyle[0]) styleIndex=markersGroupsStyles.indexOf(curStyle[0]) + 1; return { text: markers.length, index: styleIndex };}}; gmpGoogleMap.prototype.getClasterer=function(){ if(this._clasterer){ return this._clasterer; } return false; }; gmpGoogleMap.prototype.setClasterer=function(clasterer){ this._clasterer=clasterer; }; gmpGoogleMap.prototype.setMapMarkersGroups=function(groups){ this.mapMarkersGroups=groups; }; gmpGoogleMap.prototype.getMapMarkersGroups=function(){ return this.mapMarkersGroups; }; gmpGoogleMap.prototype.setClastererMarkersGroupsStyles=function(){ var mapMarkersGroups=this.getMapMarkersGroups() , markersGroupsStyles=this.getClastererMarkersGroupsStyles() , defClasterIcon=GMP_DATA.modPath + 'gmap/img/m1.png' , oldDefClasterIcon='https://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/images/m1.png' // Prevent to use old default claster icon cdn icon because it is missing , clasterIcon=this.getParam('marker_clasterer_icon') , iconWidth=this.getParam('marker_clasterer_icon_width') , iconHeight=this.getParam('marker_clasterer_icon_height'); clasterIcon=clasterIcon&&clasterIcon!=oldDefClasterIcon ? clasterIcon:defClasterIcon; iconWidth=iconWidth ? iconWidth:53; iconHeight=iconHeight ? iconHeight:52; markersGroupsStyles.push({ marker_group_id: 0 , url: clasterIcon , width: iconWidth , height: iconHeight }); if(mapMarkersGroups){ for(var i=0; i < mapMarkersGroups.length; i++){ var markerGroupId=mapMarkersGroups[i].id , markerGroupClasterIcon=mapMarkersGroups[i].params.claster_icon , markerGroupClasterIconWidth=mapMarkersGroups[i].params.claster_icon_width , markerGroupClasterIconHeight=mapMarkersGroups[i].params.claster_icon_height; if(markerGroupClasterIcon&&markerGroupClasterIcon!=clasterIcon){ markersGroupsStyles.push({ marker_group_id: markerGroupId , url: markerGroupClasterIcon ? markerGroupClasterIcon:defClasterIcon , width: markerGroupClasterIconWidth ? markerGroupClasterIconWidth:53 , height: markerGroupClasterIconHeight ? markerGroupClasterIconHeight:52 }); }} }}; gmpGoogleMap.prototype.getClastererMarkersGroupsStyles=function(){ return this._clastererMarkersGroupsStyles; }; gmpGoogleMap.prototype.setClastererGridSize=function(size){ var clasterer=this.getClasterer(); size=size&&parseInt(size) ? parseInt(size):null; if(clasterer&&size){ clasterer.setGridSize(size); }}; gmpGoogleMap.prototype.getClastererGridSize=function(){ var clasterer=this.getClasterer() , clusterGridSize=null; if(clasterer){ clusterGridSize=clasterer.getGridSize(); } return clusterGridSize; }; gmpGoogleMap.prototype.markersRefresh=function(){ var clasterer=this.getClasterer(); if(this._clastererEnabled&&clasterer){ clasterer.clearMarkers(); clasterer.addMarkers(this.getAllRawMarkers()); } jQuery(document).trigger('gmapAfterMarkersRefresh', this); }; gmpGoogleMap.prototype._addEventListenerHandle=function(event, code, handle){ if(!this._eventListeners[ event ]) this._eventListeners[ event ]={}; this._eventListeners[ event ][ code ]=handle; }; gmpGoogleMap.prototype._getEventListenerHandle=function(event, code){ return this._eventListeners[ event ]&&this._eventListeners[ event ][ code ] ? this._eventListeners[ event ][ code ] : false; }; gmpGoogleMap.prototype.getRawMapInstance=function(){ return this._mapObj; }; gmpGoogleMap.prototype.setCenter=function (lat, lng){ if(typeof lng=='undefined'){ this.getRawMapInstance().setCenter(lat); }else this.getRawMapInstance().setCenter(new google.maps.LatLng(lat, lng)); return this; }; gmpGoogleMap.prototype.getCenter=function (){ return this.getRawMapInstance().getCenter(); }; gmpGoogleMap.prototype.setZoom=function (zoomLevel){ this.getRawMapInstance().setZoom(parseInt(zoomLevel)); }; gmpGoogleMap.prototype.getZoom=function (){ return this.getRawMapInstance().getZoom(); }; gmpGoogleMap.prototype.getBounds=function (){ return this.getRawMapInstance().getBounds(); }; gmpGoogleMap.prototype.fitBounds=function (bounds){ this.getRawMapInstance().fitBounds(bounds); }; gmpGoogleMap.prototype.addMarker=function(params){ var newMarker=new gmpGoogleMarker(this, params); this._markers.push(newMarker); return newMarker; }; gmpGoogleMap.prototype.addShape=function(params){ var newShape=new gmpGoogleShape(this, params); this._shapes.push(newShape); return newShape; }; gmpGoogleMap.prototype.addHeatmap=function(params){ var heatmap=new gmpGoogleHeatmap(this, params); this._heatmap.push(heatmap); return heatmap; }; gmpGoogleMap.prototype.getMarkerById=function(id){ if(this._markers&&this._markers.length){ for(var i in this._markers){ if(this._markers[i].getId&&this._markers[i].getId()==id) return this._markers[ i ]; }} return false; }; gmpGoogleMap.prototype.getShapeById=function(id){ if(this._shapes&&this._shapes.length){ for(var i in this._shapes){ if(this._shapes[ i ].getId()==id) return this._shapes[ i ]; }} return false; }; gmpGoogleMap.prototype.getHeatmap=function(){ if(this._heatmap&&this._heatmap.length){ return this._heatmap[0]; } return false; }; gmpGoogleMap.prototype.removeMarker=function(id){ var marker=this.getMarkerById(id); if(marker){ marker.removeFromMap(); }}; gmpGoogleMap.prototype.removeShape=function(id){ var shape=this.getShapeById(id); if(shape){ shape.removeFromMap(); }}; gmpGoogleMap.prototype.getAllMarkers=function(){ return this._markers; }; gmpGoogleMap.prototype.getAllShapes=function(){ return this._shapes; }; gmpGoogleMap.prototype.getAllRawMarkers=function(){ var res=[]; if(this._markers&&this._markers.length){ for(var i=0; i < this._markers.length; i++){ res.push(this._markers[i].getRawMarkerInstance()); }} return res; }; gmpGoogleMap.prototype.setMarkersParams=function(markers){ if(this._markers&&this._markers.length){ for(var i=0; i < this._markers.length; i++){ for(var j=0; j < markers.length; j++){ if(this._markers[i].getId()==markers[j].id){ this._markers[i].setMarkerParams(markers[j]); break; }} }} }; gmpGoogleMap.prototype.get=function(key){ return this.getRawMapInstance().get(key); }; gmpGoogleMap.prototype.set=function(key, value){ this.getRawMapInstance().set(key, value); return this; }; gmpGoogleMap.prototype.clearMarkers=function(){ if(this._markers&&this._markers.length){ for(var i=0; i < this._markers.length; i++){ this._markers[i].setMap(null); } this._markers=[]; }}; gmpGoogleMap.prototype.clearMarkersByParam=function(param){ if(this._markers&&this._markers.length){ for(var i=0; i < this._markers.length; i++){ if(this._markers[i].getMarkerParam(param)){ this._markers[i].setMap(null); this._markers.splice(i, 1); this.clearMarkersByParam(param); break; }} }}; gmpGoogleMap.prototype.clearShapes=function(){ if(this._shapes&&this._shapes.length){ for(var i=0; i < this._shapes.length; i++){ this._shapes[i].setMap(null); } this._shapes=[]; }}; gmpGoogleMap.prototype.getViewId=function(){ return this._mapParams.view_id; }; gmpGoogleMap.prototype.getViewHtmlId=function(){ return this._mapParams.view_html_id; }; gmpGoogleMap.prototype.getId=function(){ return this._mapParams.id; }; gmpGoogleMap.prototype.refresh=function(){ return google.maps.event.trigger(this.getRawMapInstance(), 'resize'); }; gmpGoogleMap.prototype.refreshWithCenter=(function(lat, lng, zoom){ var res=google.maps.event.trigger(this.getRawMapInstance(), 'resize'); if(zoom){ this.setZoom(zoom); }else{ this.setZoom(this.getZoom()); } if(lat&&lng){ this.setCenter(lat, lng); }else{ this.setCenter(this.getCenter().lat(), this.getCenter().lng()); } return res; }); gmpGoogleMap.prototype.fullRefresh=function(){ this.refresh(); this.checkMarkersParams(this._markers, false); this.setCenter(this._mapParams.center); }; gmpGoogleMap.prototype.checkMarkersParams=function(markers, needToShow){ if(markers&&markers.length){ for (var i=0; i < markers.length; i++){ var markerParams=markers[i].getMarkerParam('params') , showDescription=parseInt(markerParams.show_description); if(showDescription||needToShow){ markers[i].showInfoWnd(true, showDescription); }} }}; gmpGoogleMap.prototype.resizeMapByHeight=function(e, elem, withoutAfter){ if(!GMP_DATA.isAdmin&&parseInt(this.getParam('adapt_map_to_screen_height'))&&this.getRawMapInstance().map_display_mode!='popup'){ var viewId=this.getParam('view_id') , selectors=this.getParam('selectors') , windowObj=jQuery(window) , mapContainer=jQuery('#gmpMapDetailsContainer_' + viewId) , mapContainerWrap=jQuery('#mapConElem_' + viewId) , height; withoutAfter=withoutAfter ? withoutAfter:(mapContainerWrap.data('rmh-without-after') ? mapContainerWrap.data('rmh-without-after'):false); elem=elem ? elem:(mapContainerWrap.data('rmh-additional-elem') ? jQuery(mapContainerWrap.data('rmh-additional-elem')):null); if(!selectors||(!selectors.content_before&&!selectors.content_after)){ var mapContainerOffset=mapContainer.length ? mapContainer.offset():false , windowHeight=windowObj.height(); height=mapContainerOffset.top < windowHeight ? windowHeight - mapContainerOffset.top:windowHeight; }else{ var viewportData=this.getViewportData(0, withoutAfter) , proControlsCon=jQuery('#gmpMapProControlsCon_'+ viewId); height=viewportData.height; mapContainer.parents('.gmp_map_opts:first').css({ 'position': 'fixed' , 'top': viewportData.contentBeforeHeight , 'left': '0' , 'width': windowObj.width() , 'height': height , 'z-index': 1 }); if(proControlsCon.find('.gmpMarkersListCollapseShell').length){ mapContainer.parents('.gmp_map_opts:first').css({ 'overflow-x': 'hidden' , 'overflow-y': 'auto' }); } jQuery(selectors.content_before).css({ 'z-index': 2 }); if(!withoutAfter){ jQuery(selectors.content_after).css({ 'position': 'fixed' , 'bottom': '0' , 'left': '0' , 'width': windowObj.width() , 'z-index': 1 }); } if(elem&&elem.length){ height -=elem.outerHeight(true); }} jQuery('#gmpMapDetailsContainer_' + viewId + ', #' + this.getParam('view_html_id')).each(function (){ jQuery(this).height(height); }); this.refresh(); }}; gmpGoogleMap.prototype.getViewportData=function(additionalHeight, withoutAfter){ withoutAfter=withoutAfter ? withoutAfter:false; additionalHeight=additionalHeight ? additionalHeight:0; var selectors=this.getParam('selectors') , adminBar=jQuery('#wpadminbar') , viewportData={ height: jQuery(window).height(), contentBeforeHeight: 0, contentAfterHeight: 0 } , i; if(typeof selectors!=='undefined'&&selectors!=null){ var contentBefore=typeof selectors.content_before!=='undefined' ? jQuery(selectors.content_before):0 , contentAfter=typeof selectors.content_after!=='undefined' ? jQuery(selectors.content_after):0; if(adminBar.length){ viewportData.contentBeforeHeight +=adminBar.outerHeight(true); } if(contentBefore.length){ for(i=0; i < contentBefore.length; i++){ viewportData.contentBeforeHeight +=jQuery(contentBefore[i]).outerHeight(true); }} if(contentAfter.length&&!withoutAfter){ for(i=0; i < contentAfter.length; i++){ viewportData.contentAfterHeight +=jQuery(contentAfter[i]).outerHeight(true); }} } viewportData.height=viewportData.height - viewportData.contentBeforeHeight - viewportData.contentAfterHeight - additionalHeight; return viewportData; }; gmpGoogleMap.prototype.applyZoomType=function(){ if(!GMP_DATA.isAdmin&&this.getParam('zoom_type')=='fit_bounds'){ var eventHandle=google.maps.event.addListenerOnce(this.getRawMapInstance(), 'tilesloaded', jQuery.proxy(this._getBoundsHandler, this)); this._addEventListenerHandle('tilesloaded', 'fitBounds', eventHandle); }}; gmpGoogleMap.prototype.applyZoomTypeAdmin=function(){ if(GMP_DATA.isAdmin&&this.getParam('zoom_type')=='fit_bounds'){ this._getBoundsHandler(); }}; gmpGoogleMap.prototype._getBoundsHandler=function(){ var bounds=new google.maps.LatLngBounds(); bounds=this._getMapMarkersBounds(bounds); this._setMapBounds(bounds); }; gmpGoogleMap.prototype._getMapMarkersBounds=function(bounds){ var markers=this.getAllMarkers(); for (var i=0; i < markers.length; i++){ bounds.extend(markers[i].getPosition()); } return bounds; }; gmpGoogleMap.prototype._setMapBounds=function(bounds){ if(!bounds.getNorthEast().equals(bounds.getSouthWest())){ this.fitBounds(bounds); }}; var g_gmpGeocoder=null; jQuery.fn.mapSearchAutocompleateGmp=function(params){ params=params||{}; jQuery(this).keyup(function(event){ if(toeInArrayGmp(event.keyCode, [9, 13, 20, 35, 36, 37, 38, 39, 40])) return; var searchData=jQuery.trim(jQuery(this).val()); if(searchData&&searchData!=''){ if(typeof(params.msgEl)==='string'){ params.msgEl=jQuery(params.msgEl); } params.msgEl.showLoaderGmp(); var self=this; jQuery(this).autocomplete(jQuery.extend({}, params.autocompleteParams, { source: function(request, response){ var autocomleateData=typeof(params.additionalData)!='undefined' ? gmpAutocomleateData(params.additionalData, request.term):[] , geocoder=gmpGetGeocoder() , geocoderData={ 'address': searchData }; if(typeof(params.geocoderParams)!='undefined'&¶ms.geocoderParams){ geocoderData=jQuery.extend({}, geocoderData, params.geocoderParams) } geocoder.geocode(geocoderData, function(results, status){ params.msgEl.html(''); if(status==google.maps.GeocoderStatus.OK&&results.length){ for(var i=0; i < results.length; i++){ autocomleateData.push({ label: results[i].formatted_address , lat: results[i].geometry.location.lat() , lng: results[i].geometry.location.lng() , category: toeLangGmp('Plases') }); } response(autocomleateData); }else{ if(autocomleateData){ response(autocomleateData); }else{ var notFoundMsg=toeLangGmp('Nothing was found'); if(jQuery(self).parent().find('.ui-helper-hidden-accessible').size()){ jQuery(self).parent().find('.ui-helper-hidden-accessible').html(notFoundMsg); }else{ params.msgEl.html(notFoundMsg); }} }}); } , select: function(event, ui){ if(params.onSelect){ params.onSelect(ui.item, event, ui); }} })); jQuery(this).autocomplete('search'); }}); }; function gmpAutocomleateData(data, needle){ var autocomleateData=[]; for(var i=0; i < data.length; i++){ for(var j=0; j < data[i].length; j++){ if(data[i][j]){ var label=data[i][j].label.toString().toLowerCase() , desc=data[i][j].marker_desc!='undefined' ? data[i][j].marker_desc:'' , term=needle.toLowerCase(); if(label.indexOf(term)!==-1||(desc&&desc.indexOf(term)!==-1)){ autocomleateData.push(data[i][j]); }} }} return autocomleateData; } function gmpGetGeocoder(){ if(!g_gmpGeocoder){ g_gmpGeocoder=new google.maps.Geocoder(); } return g_gmpGeocoder; } function changeInfoWndType(map){ var infowndContent=jQuery('#'+ map._elementId.id).find('.gm-style-iw') , type=map.getParam('marker_infownd_type') , hideInfoWndBtn=parseInt(map.getParam('marker_infownd_hide_close_btn')); switch(type){ case '': if(infowndContent&&infowndContent.length){ infowndContent.each(function(){ var $this=jQuery(this) , wndBody=$this.prev().children().last() , wndBodyShadow=$this.prev().children(':nth-child(2)') , wndTail=$this.prev().children(':nth-child(3)') , wndTailShadow=$this.prev().children().first(); $this.css({ 'border-radius': '0px' }); }); } break; case 'rounded_edges': if(infowndContent&&infowndContent.length){ infowndContent.each(function(){ var $this=jQuery(this) , wndBody=$this.prev().children().last() , wndBodyShadow=$this.prev().children(':nth-child(2)') , wndTail=$this.prev().children(':nth-child(3)') , wndTailShadow=$this.prev().children().first(); if(hideInfoWndBtn!==0){ $this.find(".gm-ui-hover-effect").hide(); } $this.find('.gmpInfoWindowtitle').css({ 'padding': '0' , 'left': '0' }); wndBody.css({ 'border-radius': '10px' }); wndBodyShadow.css({ 'background-color': 'transparent', '-moz-box-shadow': 'none', '-webkit-box-shadow': 'none', 'box-shadow': 'none' }); wndTail.children().each(function(index){ var $this=jQuery(this) , degrees = !index ? 'skewX(50.6deg)':'skewX(-50.6deg)' , left = !index ? '-2px':'0'; $this.css({ 'height': '15px' }); $this.children().css({ 'width': '20px' , 'left': left , 'transform': degrees , '-moz-box-shadow': 'none' , '-webkit-box-shadow': 'none' , 'box-shadow': 'none' }); }); wndTailShadow.css({ 'border-right': 'none' , 'border-left': 'none' , 'border-top': 'none' , 'left': '38px' , 'top': '74px' }); }); } break; default: break; }} function changeInfoWndBgColor(map){ g_gmpMarkerBgColorTimeoutSet=false; var color=map.getParam('marker_infownd_bg_color'); var infowndContent=jQuery('#'+ map._elementId.id).find('.gm-style-iw'), styleId='gmpInfoWindowStyle'; if(infowndContent&&infowndContent.length){ infowndContent.each(function(){ var wndBody=jQuery(this).prev().children().last() , wndTail=jQuery(this).prev().children(':nth-child(3)').children().last(); infowndContent.css('background-color', color); infowndContent.prev().children().last().css('background-color', color); infowndContent.children().css('background-color', color); var styleTag=jQuery('#'+styleId), styles='.gm-style-iw-t::after { background:'+color+' !important; }'; styles +='.gm-style .gm-style-iw-d::-webkit-scrollbar-track, .gm-style .gm-style-iw-d::-webkit-scrollbar-track-piece { background: '+color+' !important; }'; if(styleTag.length){ styleTag.html(styles); }else{ jQuery('').attr('id', styleId).appendTo('head'); }}); }} window.gmpGoogleMap=gmpGoogleMap; function gmpGoogleMarker(map, params){ this._map=map; this._markerObj=null; var defaults={ }; if(!params.position&¶ms.coord_x&¶ms.coord_y){ params.position=new google.maps.LatLng(params.coord_x, params.coord_y); } this._markerParams=jQuery.extend({}, defaults, params); this._markerParams.map=this._map.getRawMapInstance(); this._infoWindow=null; this._infoWndOpened=false; this._infoWndWasInited=false; this._infoWndDirectionsBtn=false; this._infoWndPrintBtn=false; this._mapDragScroll={ scrollwheel: null }; this.init(); } gmpGoogleMarker.prototype.infoWndOpened=function(){ return this._infoWndOpened; }; gmpGoogleMarker.prototype.init=function(){ var markerParamsForCreate=this._markerParams , openInfoWndEvent='click' , closeInfoWndEvent='' , openLinkEvent='click'; if(parseInt(this._map._mapParams.hide_marker_tooltip)){ this._markerParams.marker_title=this._markerParams.title; delete markerParamsForCreate.title; } this._markerObj=new google.maps.Marker(markerParamsForCreate); if(this._markerParams.dragend){ this._markerObj.addListener('dragend', jQuery.proxy(this._markerParams.dragend, this)); } if(this._markerParams.click){ this._markerObj.addListener('click', jQuery.proxy(this._markerParams.click, this)); } this._markerObj.addListener('domready', jQuery.proxy(function(){ changeInfoWndBgColor(this._map); }, this)); if(this._markerParams.params&&!(window.ontouchstart===null||navigator.msMaxTouchPoints)){ if(parseInt(this._markerParams.params.description_mouse_hover)){ openInfoWndEvent='mouseover'; if(parseInt(this._markerParams.params.description_mouse_leave)){ closeInfoWndEvent='mouseout'; }} } this._markerObj.addListener(openInfoWndEvent, jQuery.proxy(function (){ if(this._markerParams.params && !parseInt(this._markerParams.params.description_mouse_hover) && parseInt(this._markerParams.params.marker_link) ){ return; }else{ this.showInfoWnd(); } jQuery(document).trigger('gmapAfterMarkerClick', this); }, this)); if(closeInfoWndEvent){ this._markerObj.addListener(closeInfoWndEvent, jQuery.proxy(function (){ var self=this , infoWndDiv=jQuery('.gm-style-iw').parent() , timeout=300; infoWndDiv.on('mouseover', function (){ infoWndDiv.addClass('hovering'); }); infoWndDiv.on('mouseleave', function (){ setTimeout(function(){ self.hideInfoWnd(); }, timeout); }); setTimeout(function(){ if(!infoWndDiv.hasClass('hovering')){ self.hideInfoWnd(); }}, timeout); }, this)); } if(this._markerParams.params&&parseInt(this._markerParams.params.marker_link)){ this._markerObj.addListener(openLinkEvent, jQuery.proxy(function (){ var isLink=/http/gi , markerLink = !this._markerParams.params.marker_link_src.match(isLink) ? 'http://' + this._markerParams.params.marker_link_src : this._markerParams.params.marker_link_src; if(parseInt(this._markerParams.params.marker_link_new_wnd)){ window.open(markerLink, '_blank'); }else{ location.href=markerLink; }}, this)); }}; gmpGoogleMarker.prototype.showInfoWnd=function(forceUpdateInfoWnd, forceShow){ var allShapes=this._map.getAllShapes(); if(allShapes&&allShapes.length){ for(var i=0; i < allShapes.length; i++){ if(allShapes[i]._infoWndOpened) allShapes[i].hideInfoWnd(); }} if(!this._infoWndWasInited||forceUpdateInfoWnd){ this._updateInfoWndContent(); this._infoWndWasInited=true; } if(this._infoWindow&&!this._infoWndOpened){ var allMapMArkers=this._map.getAllMarkers(); if(allMapMArkers&&allMapMArkers.length > 1&&!forceShow){ for(var i=0; i < allMapMArkers.length; i++){ allMapMArkers[i].hideInfoWnd(); }} if(parseInt(this.getMap().getParam('center_on_cur_marker_infownd'))&&!GMP_DATA.isAdmin){ this.getMap().setCenter(this.getMarkerParam('position')); } if(this._map.getParam('marker_infownd_type')=='slide'&&(typeof(this.showInfoWndSlide)=='function')){ this.showInfoWndSlide(); }else{ this._infoWindow.open(this._map.getRawMapInstance(), this._markerObj); } this._infoWndOpened=true; }}; gmpGoogleMarker.prototype.hideInfoWnd=function(){ if(this._infoWindow&&this._infoWndOpened){ this._infoWindow.close(); this._infoWndOpened=false; var googleMap=this._map.getRawMapInstance(); googleMap.setOptions({scrollwheel: this._mapDragScroll.scrollwheel}); jQuery(document).trigger('gmapAfterHideInfoWnd', this); }}; gmpGoogleMarker.prototype.getRawMarkerInstance=function(){ return this._markerObj; }; gmpGoogleMarker.prototype.getRawMarkerParams=function(){ return this._markerParams; }; gmpGoogleMarker.prototype.getIcon=(function(){ return this._markerObj.getIcon(); }); gmpGoogleMarker.prototype.setIcon=function(iconPath){ this._markerObj.setIcon(iconPath); }; gmpGoogleMarker.prototype.setTitle=function(title, noRefresh){ if(!parseInt(this._map._mapParams.hide_marker_tooltip)) this._markerObj.setTitle(title); this._markerParams.title=title; if(!noRefresh) this._updateInfoWndContent(); }; gmpGoogleMarker.prototype.getTitle=function(){ return typeof this._markerParams.title!='undefined' ? this._markerParams.title:this._markerParams.marker_title; }; gmpGoogleMarker.prototype.getPosition=function(){ return this._markerObj.getPosition(); }; gmpGoogleMarker.prototype.setPosition=function(lat, lng){ this._markerObj.setPosition(new google.maps.LatLng(lat, lng)); }; gmpGoogleMarker.prototype.lat=function(){ return this.getPosition().lat(); }; gmpGoogleMarker.prototype.lng=function(lng){ return this.getPosition().lng(); }; gmpGoogleMarker.prototype.setId=function(id){ this._markerParams.id=id; }; gmpGoogleMarker.prototype.getId=function(){ return this._markerParams.id; }; gmpGoogleMarker.prototype.setDescription=function (description, noRefresh){ this._markerParams.description=description; if(!noRefresh) this._updateInfoWndContent(); if(this._markerParams.params&&parseInt(this._markerParams.params.show_description)){ this.showInfoWnd(false, true); }}; gmpGoogleMarker.prototype.getDescription=function (){ return this._markerParams.description; }; gmpGoogleMarker.prototype._setTitleColor=function(titleDiv){ var titleColor=this._map.getParam('marker_title_color'); if(titleColor&&titleColor!=''){ titleDiv.css({ 'color': titleColor }); } return titleDiv; }; gmpGoogleMarker.prototype._setTitleSize=function(titleDiv){ var titleSize=this._map.getParam('marker_title_size') , titleSizeUnits=this._map.getParam('marker_title_size_units'); if(titleSize&&titleSizeUnits&&titleSize!=''){ titleDiv.css({ 'font-size': titleSize + titleSizeUnits , 'line-height': (+titleSize + 5) + titleSizeUnits }); } return titleDiv; }; gmpGoogleMarker.prototype._setDescSize=function(descDiv){ var descSize=this._map.getParam('marker_desc_size') , descSizeUnits=this._map.getParam('marker_desc_size_units'); if(descSize&&descSizeUnits&&descSize!=''){ descDiv.css({ 'font-size': descSize + descSizeUnits , 'line-height': parseInt(descSize) + 5 + descSizeUnits }); } return descDiv; }; gmpGoogleMarker.prototype._updateInfoWndContent=function(){ var contentStr=jQuery('
', {}) , description=this._markerParams.description ? this._markerParams.description.replace(/\n/g, '
'):false , title=this._markerParams.title ? this._markerParams.title:false; if(parseInt(this._map._mapParams.hide_marker_tooltip)&&!GMP_DATA.isAdmin){ title=this._markerParams.marker_title ? this._markerParams.marker_title:false; } if(title){ var titleDiv=jQuery('
', {}) .addClass('gmpInfoWindowtitle') .html(title); titleDiv=this._setTitleColor(titleDiv); titleDiv=this._setTitleSize(titleDiv); contentStr.append(titleDiv); if(this._infoWndDirectionsBtn){ this._infoWndDirectionsBtn.insertAfter(contentStr.find('.gmpInfoWindowtitle')); } if(this._infoWndPrintBtn){ this._infoWndPrintBtn.insertAfter(contentStr.find('.gmpInfoWindowtitle')); }} if(description){ var descDiv=jQuery('
', {}) .addClass('egm-marker-iw') .html(description); descDiv=this._setDescSize(descDiv); contentStr.append(descDiv); var $scripts=contentStr.find('script'); if($scripts&&$scripts.size()){ $scripts.each(function(){ var scriptSrc=jQuery(this).attr('src'); if(scriptSrc&&scriptSrc!=''){ jQuery.getScript(scriptSrc); }}); }} this._setInfoWndContent(contentStr); }; gmpGoogleMarker.prototype._setInfoWndClosed=function(){ this._infoWndOpened=false; jQuery(document).trigger('gmapAfterHideInfoWnd', this); }; gmpGoogleMarker.prototype._setInfoWndContent=function(newContentHtmlObj){ var self=this , map=this.getMap(); if(!this._infoWindow){ var mapWidth=GMP_DATA.isAdmin ? jQuery('#gmpMapPreview').width():jQuery('#' + map.getViewHtmlId()).width() , infoWndType=map.getParam('marker_infownd_type') , infoWndWidth=map.getParam('marker_infownd_width_units')=='px' ? map.getParam('marker_infownd_width'):mapWidth - 20 , infoWndHeight=map.getParam('marker_infownd_height_units')=='px' ? map.getParam('marker_infownd_height')+ 'px':false , maxWndWidth=mapWidth * 0.6 , infoWndParams={ maxWidth: infoWndWidth < maxWndWidth ? infoWndWidth:maxWndWidth }; switch(infoWndType){ case 'rounded_edges': infoWndParams.pixelOffset=new google.maps.Size(0, 10); break; default: break; } this._infoWindow=new google.maps.InfoWindow(infoWndParams); google.maps.event.addListener(this._infoWindow, 'domready', function(){ changeInfoWndType(map); changeInfoWndBgColor(map); if(this.content&&this.content.innerHTML&&this.content.innerHTML.indexOf&&this.content.innerHTML.indexOf('id="grid-gallery-')!=-1){ jQuery(document).trigger('ggFirInitialize'); }}); google.maps.event.addListener(this._infoWindow, 'closeclick', function(){ self._setInfoWndClosed(); }); } if(infoWndHeight){ newContentHtmlObj.css('cssText', 'max-height: '+ infoWndHeight +';'); } var scrollwheel=map.get('scrollwheel') , googleMap=map.getRawMapInstance(); this._mapDragScroll.scrollwheel=scrollwheel; newContentHtmlObj.hover(function(){ googleMap.setOptions({ scrollwheel: false }); }, function(){ googleMap.setOptions({ scrollwheel: scrollwheel }); } ); this._infoWindow.setContent(newContentHtmlObj[0]); }; gmpGoogleMarker.prototype.removeFromMap=function(){ this.getRawMarkerInstance().setMap(null); }; gmpGoogleMarker.prototype.setMarkerParams=function(params){ this._markerParams=params; return this; }; gmpGoogleMarker.prototype.setMarkerParam=function(key, value){ this._markerParams[ key ]=value; return this; }; gmpGoogleMarker.prototype.getMarkerParam=function(key){ return this._markerParams[ key ]; }; gmpGoogleMarker.prototype.setMap=function(map){ this.getRawMarkerInstance().setMap(map); }; gmpGoogleMarker.prototype.getMap=function(){ return this._map; }; gmpGoogleMarker.prototype.setVisible=function(state){ this.getRawMarkerInstance().setVisible(state); } gmpGoogleMarker.prototype.getVisible=function(state){ this.getRawMarkerInstance().getVisible(state); } function _gmpPrepareMarkersList(markers, params){ params=params||{}; if(markers){ for(var i=0; i < markers.length; i++){ markers[i].coord_x=parseFloat(markers[i].coord_x); markers[i].coord_y=parseFloat(markers[i].coord_y); markers[i].icon=markers[i].icon_data.path; if(params.dragend){ markers[i].draggable=true; markers[i].dragend=params.dragend; }} } return markers; } window.gmpGoogleMarker=gmpGoogleMarker; var g_gmpAllMaps=[]; function gmpGetMembershipGmeViewId(map, oldViewId){ var newViewId=oldViewId; if(map&&map.getParam&&map.getParam('membershipEnable')=='1'){ if(map._elementId&&map._elementId.id&&map._elementId.id.substr){ var viewIdKey='google_map_easy_' , newIdPos=map._elementId.id.substr(viewIdKey.length); if(newIdPos){ newViewId=newIdPos; }} } return newViewId; } jQuery(document).ready(function(){ var mapsInitClb=function(){ if(typeof(gmpAllMapsInfo)!=='undefined'&&gmpAllMapsInfo&&gmpAllMapsInfo.length){ for(var i=0; i < gmpAllMapsInfo.length; i++){ if(jQuery('#'+ gmpAllMapsInfo[i].view_html_id).length){ gmpInitMapOnPage(gmpAllMapsInfo[i]); }} jQuery(document).trigger('gmpAmiVarInited'); }}; if(typeof(google)==='undefined' && typeof(gmpLoadGoogleLib)!=='undefined' ){ gmpLoadGoogleLib(); setTimeout(mapsInitClb, 1000); }else{ mapsInitClb(); }}); function gmpInitMapOnPage(mapData){ if(mapData.params&&parseInt(mapData.params.is_static)&&typeof(gmpGoogleStaticMap)!=='undefined'){ new gmpGoogleStaticMap(mapData); return; } var additionalData={ markerGroups: typeof(mapData.marker_groups)!='undefined' ? mapData.marker_groups:[] } , newMap=null , mapMarkersIds=[] , markerIdToShow=gmpIsMarkerToShow() , infoWndToShow=gmpIsInfoWndToShow(); if(mapData&&mapData.view_html_mbs_id){ newMap=new gmpGoogleMap(mapData.view_html_mbs_id, mapData.params, additionalData); newMap.setParam('view_html_mbs_id', mapData.view_html_mbs_id); newMap.refreshWithCenter(mapData.params.center.lat(), mapData.params.center.lng(), mapData.params.zoom); }else{ newMap=new gmpGoogleMap('#'+ mapData.view_html_id, mapData.params, additionalData); } if(mapData.mbs_presets==1){ newMap.setParam('mbs_presets', 1); } if(mapData.markers&&mapData.markers.length){ mapData.markers=_gmpPrepareMarkersList(mapData.markers); for(var i in mapData.markers){ mapMarkersIds.push(mapData.markers[i].id); } if(toeInArray(markerIdToShow, mapMarkersIds)==-1){ markerIdToShow=false; } if(toeInArray(infoWndToShow, mapMarkersIds)==-1){ infoWndToShow=false; } for(var j=0; j < mapData.markers.length; j++){ if(markerIdToShow&&mapData.markers[j].id!=markerIdToShow) continue; if(infoWndToShow){ mapData.markers[j].params.show_description=mapData.markers[j].id==infoWndToShow ? '1':'0'; } var newMarker=newMap.addMarker(mapData.markers[j]); } newMap.markersRefresh(); newMap.checkMarkersParams(newMap.getAllMarkers(), markerIdToShow); } if(mapData.shapes&&mapData.shapes.length){ mapData.shapes=_gmpPrepareShapesList(mapData.shapes); for(var z=0; z < mapData.shapes.length; z++){ var newShape=newMap.addShape(mapData.shapes[z]); }} if(mapData.heatmap){ mapData.heatmap=_gmpPrepareHeatmapList(mapData.heatmap); newMap.addHeatmap(mapData.heatmap); } g_gmpAllMaps.push(newMap); } function gmpGetMapInfoById(id){ if(typeof(gmpAllMapsInfo)!=='undefined'&&gmpAllMapsInfo&&gmpAllMapsInfo.length){ id=parseInt(id); for(var i=0; i < gmpAllMapsInfo.length; i++){ if(gmpAllMapsInfo[i].id==id){ return gmpAllMapsInfo[i]; }} } return false; } function gmpGetMapInfoByViewId(viewId){ if(typeof(gmpAllMapsInfo)!=='undefined'&&gmpAllMapsInfo&&gmpAllMapsInfo.length){ for(var i=0; i < gmpAllMapsInfo.length; i++){ if(gmpAllMapsInfo[i].view_id==viewId){ return gmpAllMapsInfo[i]; }} } return false; } function gmpGetAllMaps(){ return g_gmpAllMaps; } function gmpGetMapById(id){ var allMaps=gmpGetAllMaps(); for(var i=0; i < allMaps.length; i++){ if(allMaps[i].getId()==id){ return allMaps[i]; }} return false; } function gmpGetMapByViewId(viewId){ var allMaps=gmpGetAllMaps(); for(var i=0; i < allMaps.length; i++){ var currViewId=allMaps[i].getViewId(); if(window.gmpGetMembershipGmeViewId){ currViewId=gmpGetMembershipGmeViewId(allMaps[i], currViewId); } if(currViewId==viewId){ return allMaps[i]; }} return false; } function gmpIsMarkerToShow(){ var markerHash='gmpMarker' , hashParams=toeGetHashParams(); if(hashParams){ for(var i in hashParams){ if(!hashParams[i]||typeof(hashParams[i])!=='string') continue; var pair=hashParams[i].split('='); if(pair[0]==markerHash) return parseInt(pair[1]); }} return false; } function gmpIsInfoWndToShow(){ var markerHash='gmpInfoWnd' , hashParams=toeGetHashParams(); if(hashParams){ for(var i in hashParams){ if(!hashParams[i]||typeof(hashParams[i])!=='string') continue; var pair=hashParams[i].split('='); if(pair[0]==markerHash) return parseInt(pair[1]); }} return false; }; !function(t){var e={};function __webpack_require__(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,__webpack_require__),r.l=!0,r.exports}__webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,n){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},__webpack_require__.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.t=function(t,e){if(1&e&&(t=__webpack_require__(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(__webpack_require__.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)__webpack_require__.d(n,r,function(e){return t[e]}.bind(null,r));return n},__webpack_require__.n=function(t){var e=t&&t.__esModule?function getDefault(){return t.default}:function getModuleExports(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=753)}([function(t,e){t.exports=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){t.exports=n(148)},function(t,e){t.exports=function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){var r=n(1);function _defineProperties(t,e){for(var n=0;n1?arguments[1]:void 0)}}),n(78)("find")},function(t,e,n){var r=n(26);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(104),o=n(56);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(137),o=n(195),i=n(198);function _get(e,n,u){return"undefined"!=typeof Reflect&&o?t.exports=_get=o:t.exports=_get=function _get(t,e,n){var o=i(t,e);if(o){var u=r(o,e);return u.get?u.get.call(n):u.value}},_get(e,n,u||e)}t.exports=_get},function(t,e,n){t.exports=n(199)},function(t,e,n){var r=n(16),o=n(43);t.exports=n(13)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){t.exports=!n(28)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(44),o=n(91);t.exports=n(25)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(44).f,o=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in o||n(25)&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},function(t,e,n){var r=n(42);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var r=n(56);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(15),o=n(45),i=n(27),u=n(33),c=n(58),$export=function(t,e,n){var s,a,f,l,p=t&$export.F,v=t&$export.G,h=t&$export.S,d=t&$export.P,g=t&$export.B,y=v?r:h?r[e]||(r[e]={}):(r[e]||{}).prototype,m=v?o:o[e]||(o[e]={}),_=m.prototype||(m.prototype={});for(s in v&&(n=e),n)f=((a=!p&&y&&void 0!==y[s])?y:n)[s],l=g&&a?c(f,r):d&&"function"==typeof f?c(Function.call,f):f,y&&u(y,s,f,t&$export.U),m[s]!=f&&i(m,s,l),d&&_[s]!=f&&(_[s]=f)};r.core=o,$export.F=1,$export.G=2,$export.S=4,$export.P=8,$export.B=16,$export.W=32,$export.U=64,$export.R=128,t.exports=$export},function(t,e,n){var r=n(15),o=n(27),i=n(54),u=n(64)("src"),c=n(126),s=(""+c).split("toString");n(45).inspectSource=function(t){return c.call(t)},(t.exports=function(t,e,n,c){var a="function"==typeof n;a&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(a&&(i(n,u)||o(n,u,t[e]?""+t[e]:s.join(String(e)))),t===r?t[e]=n:c?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,"toString",(function toString(){return"function"==typeof this&&this[u]||c.call(this)}))},function(t,e){t.exports={}},,function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(113),o=n(73);t.exports=Object.keys||function keys(t){return r(t,o)}},,function(t,e,n){var r=n(138),o=n(105);function _typeof(e){return t.exports=_typeof="function"==typeof o&&"symbol"==typeof r?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof o&&t.constructor===o&&t!==o.prototype?"symbol":typeof t},_typeof(e)}t.exports=_typeof},function(t,e,n){var r=n(50),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(18),o=n(116),i=n(108),u=Object.defineProperty;e.f=n(25)?Object.defineProperty:function defineProperty(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){var n=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports=!0},function(t,e,n){var r=n(12),o=n(128),i=n(73),u=n(70)("IE_PROTO"),Empty=function(){},createDict=function(){var t,e=n(92)("iframe"),r=i.length;for(e.style.display="none",n(129).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("